package com.glsc.ngateway.common.base.repo.mysql.gateway.platform.it.project;

import com.glsc.ngateway.common.base.domain.mysql.gateway.platform.it.project.ProjectSystemRelation;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import javax.validation.constraints.NotBlank;
import java.util.List;

@Repository
public interface ProjectSystemRelationRepo extends JpaRepository<ProjectSystemRelation, Long> {

    /**
     * 批量查询:通过项目编号list
     * @param proNoList
     * @return
     */
    List<ProjectSystemRelation> findAllByProjectNoIn(List<String> proNoList);

    /**
     * 通过项目编号删除relatuion
     * @param projectNo
     */
    void deleteAllByProjectNo(@NotBlank String projectNo);
}
